package jicheng;

class Person{
    public void eat(){
        System.out.println("吃饭");
    }
    public void sleep(){
        System.out.println("睡觉");
    }
}

class student extends Person{

}

class teacher extends Person{

}
public class extendsDemo01 {
    public static void main(String[] args) {
        student s = new student();
        s.eat();
        s.sleep();
        System.out.println("---------");
        teacher t = new teacher();
        t.eat();
        t.sleep();
    }
}
